var e = require;
var t = module;
var o = exports;
Object.defineProperty(o, "__esModule", {value: !0});
var n = e("LoadRes"),
    a = e("sdkConfig"),
    i = e("AdCenter"),
    r = (function () {
        function e() {
            (this.SW_SystemBanner = !1),
                (this.SW_SystemInters = !1),
                (this.SW_Video = !1),
                (this.SW_Native = !1),
                (this.SW_NativeBanner = !1),
                (this.SW_NativeInters = !1),
                (this.SW_Box = !1),
                (this.SW_Block = !1),
                (this.SW_BigNative = !1),
                (this.SW_IconNative = !1),
                (this.ID_SystemBanner = ""),
                (this.ID_SystemInters = ""),
                (this.ID_Native = ""),
                (this.ID_NativeCustom = ""),
                (this.ID_Video = ""),
                (this.ID_Box = ""),
                (this.ID_Block = ""),
                (this.NUM_NativeIntersP = 0),
                (this.NUM_NativeIntersReport = 1),
                (this.NUM_BannerErrP = 0),
                (this.NUM_BannerErrMost = 0),
                (this.NUM_BannerErrMust = 0),
                (this.NUM_VideoErrP = 0),
                (this.NUM_VideoErrMost = 0),
                (this.NUM_VideoErrMust = 0),
                (this.NUM_BannerUpdateTime = 60),
                (this.SW_SystemBannerFirst = !0),
                (this.NUM_BannerMostShow = 99),
                (this.SW_IntersBaseControl = !1),
                (this.NUM_IntersStart = 0),
                (this.NUM_IntersIntervalNum = 0),
                (this.NUM_IntersIntervalTime = 0),
                (this.NUM_IntersDelayTime = 0),
                (this.NUM_IntersDelayP = 0),
                (this.NUM_NativeUpdateTime = 30),
                (this.SW_AddDesktop = !1),
                (this.SW_IntersIntervalToAddDesktop = !1),
                (this.NUM_AutoAddDeskMostTimes = 0),
                (this.NUM_IntersToAddDesktopNumber = 0),
                (this.SW_Statistics = !0),
                (this.SW_NavigateIcon = !1),
                (this.SW_NavigateGroup = !1),
                (this.SW_NavigateSettle = !1),
                (this.pushGameList = []),
                (this.systemIntersAd = null),
                (this.loadSucc_SystemInters = !1),
                (this.NUM_hasShowInters = 0),
                (this.NUM_intersNowInterval = 0),
                (this.NUM_IntersNowIntervalTime = 99),
                (this.NUM_IntersNowToAddDesktop = 0),
                (this.bannerAd = null),
                (this.loadSucc_Banner = !1),
                (this.loadSucc_SystemBanner = !1),
                (this.hasShowBanner = !1),
                (this.isShow_SystemBanner = !1),
                (this.interval_updateBanner = null),
                (this.timeout_checkBannerLoadSucc = null),
                (this.NUM_CheckBannerLoadSucc = 0),
                (this.NUM_MaxCheckBannerLoadSucc = 5),
                (this.NUM_BannerClose = 0),
                (this.videoAd = null),
                (this.loadSucc_Video = !1),
                (this.callback_Video = null),
                (this.nativeAd = null),
                (this.hasCreateNative = !1),
                (this.loadSucc_NewNativeAd = !1),
                (this.nativeAdShowInfo = ["", ""]),
                (this.nativeAdInfo = null),
                (this.nativeBannerRes = null),
                (this.res_NativeBannerLoadNative = null),
                (this.loadSucc_NativeBanner = !1),
                (this.isShow_NativeBanner = !1),
                (this.node_nativeBanner = null),
                (this.nativeIntersRes = null),
                (this.res_NativeIntersLoadNative = null),
                (this.loadSucc_NativeInters = !1),
                (this.node_nativeInters = null),
                (this.createNative_NativeBanner = !1),
                (this.createNative_NativeInters = !1),
                (this.node_privacyAgreement = null),
                (this.isShow_PrivacyAgreement = !1),
                (this.miniGame_version = "101"),
                (this.AdGroup = ""),
                (this.app_test_version = !1);
        }
        return (
            (e.prototype.GameVersion = function (e) {
                this.app_test_version = this.miniGame_version == e;
            }),
            (e.prototype.getGameTestVersion = function () {
                return this.app_test_version;
            }),
            (e.prototype.createAd = function () {
                this.NUM_IntersIntervalTime > 0 && this.runIntersInterval(),
                    this.SW_Video && "" != this.ID_Video && this.createVideo(),
                    this.SW_Native &&
                        "" != this.ID_Native &&
                        (this.onGameShow(),
                        this.SW_NativeBanner && this.loadNativeBannerRes(),
                        this.SW_NativeInters && this.loadNativeInterRes()),
                    hbs.setKeepScreenOn({keepScreenOn: !0});
            }),
            (e.prototype.startLoadPushGamaes = function () {}),
            (e.prototype.createSystemInters = function () {
                var e = this;
                console.log("ChaoQiGameSDK", "--createSystemInters--"),
                    a.default.stringHasSpace(this.ID_SystemInters)
                        ? console.log(
                              "ChaoQiGameSDK",
                              "channelId:",
                              a.default.channelId,
                              "当前渠道系统插屏广告ID中含有空字符串,请检查后台系统插屏广告ID*********************"
                          )
                        : ((this.systemIntersAd = hbs.createInterstitialAd({adUnitId: this.ID_SystemInters})),
                          this.systemIntersAd.onLoad(function () {
                              console.log("ChaoQiGameSDK", "HW 系统插屏广告加载完成"), e.systemIntersAd.show();
                          }),
                          this.systemIntersAd.onError(function (e) {
                              console.log("ChaoQiGameSDK", "HW 系统插屏加载失败：", JSON.stringify(e));
                          }),
                          this.systemIntersAd.onClose(function () {
                              console.log("ChaoQiGameSDK", "HW 用户手动关闭系统插屏"),
                                  (e.NUM_IntersNowIntervalTime = 0);
                          }),
                          this.systemIntersAd.load());
            }),
            (e.prototype.createSystemBanner = function () {
                var e = this;
                if (
                    (console.log("ChaoQiGameSDK", "--createSystemBanner--"),
                    a.default.stringHasSpace(this.ID_SystemBanner))
                )
                    console.log(
                        "ChaoQiGameSDK",
                        "channelId:",
                        a.default.channelId,
                        "当前渠道系统banner广告ID中含有空字符串,请检查后台系统banner广告ID*********************"
                    );
                else {
                    var t = hbs.getSystemInfoSync().windowWidth,
                        o = hbs.getSystemInfoSync().windowHeight;
                    (this.bannerAd = hbs.createBannerAd({
                        adUnitId: this.ID_SystemBanner,
                        style: {top: o - 57, left: t < o ? (t - 360) / 2 : 0, height: 57, width: 360}
                    })),
                        this.bannerAd.onLoad(function () {
                            console.log("ChaoQiGameSDK", "HW 系统banner展示成功"), (e.isShow_SystemBanner = !0);
                        }),
                        this.bannerAd.onError(function (e) {
                            console.log("ChaoQiGameSDK", "HW 系统banner加载错误：", JSON.stringify(e));
                        }),
                        this.bannerAd.onClose(function () {
                            console.log(
                                "ChaoQiGameSDK",
                                "HW 系统banner被用户关闭",
                                e.NUM_BannerUpdateTime,
                                "S后再次刷新"
                            );
                        }),
                        this.hasShowBanner && this.bannerAd.show();
                }
            }),
            (e.prototype.createVideo = function () {
                var e = this;
                console.log("ChaoQiGameSDK", "--createVideo--"),
                    a.default.stringHasSpace(this.ID_Video)
                        ? console.log(
                              "ChaoQiGameSDK",
                              "channelId:",
                              a.default.channelId,
                              "当前渠道视频广告ID中含有空字符串,请检查后台视频广告ID*********************"
                          )
                        : ((this.videoAd = hbs.createRewardedVideoAd({adUnitId: this.ID_Video})),
                          this.videoAd.onLoad(function () {
                              console.log("ChaoQiGameSDK", "HW 视频广告加载完成"), (e.loadSucc_Video = !0);
                          }),
                          this.videoAd.onError(function (t) {
                              console.log("ChaoQiGameSDK", "HW 视频加载失败：" + JSON.stringify(t)),
                                  (e.loadSucc_Video = !1),
                                  e.videoAd &&
                                      setTimeout(function () {
                                          e.videoAd && e.videoAd.load();
                                      }, 3e4);
                          }),
                          this.videoAd.onClose(function (t) {
                              t.isEnded
                                  ? (console.log("ChaoQiGameSDK", "HW 激励视频广告完成，发放奖励"),
                                    e.callback_Video && (e.callback_Video(!0), e.videoAd.load()))
                                  : (console.log("ChaoQiGameSDK", "HW 激励视频广告取消关闭，不发放奖励"),
                                    e.callback_Video && (e.callback_Video(!1), e.videoAd.load()));
                          }),
                          this.videoAd.load());
            }),
            (e.prototype.createNative = function () {
                var e = this;
                console.log("ChaoQiGameSDK", "--createNative--"),
                    a.default.stringHasSpace(this.ID_Native)
                        ? console.log(
                              "ChaoQiGameSDK",
                              "channelId:",
                              a.default.channelId,
                              "当前渠道原生广告ID中含有空字符串,请检查后台原生广告ID*********************"
                          )
                        : ((this.nativeAd = hbs.createNativeAd({adUnitId: this.ID_Native})),
                          (this.nativeAdInfo = {
                              adId: null,
                              title: "",
                              source: "",
                              clickBtnTxt: "",
                              Native_icon: null,
                              Native_BigImage: null
                          }),
                          (this.hasCreateNative = !0),
                          this.nativeAd.onLoad(function (t) {
                              console.log("ChaoQiGameSDK", "HW 原生广告加载成功", JSON.stringify(t.adList[0])),
                                  (e.loadSucc_NewNativeAd = !0);
                              var o = t.adList[0];
                              null != o.adId && "" != o.adId && (e.nativeAdInfo.adId = o.adId),
                                  null != o.title && "" != o.title && (e.nativeAdInfo.title = o.title),
                                  null != o.source && "" != o.source && (e.nativeAdInfo.source = o.source),
                                  null != o.clickBtnTxt &&
                                      "" != o.clickBtnTxt &&
                                      (e.nativeAdInfo.clickBtnTxt = o.clickBtnTxt),
                                  o && null != o.imgUrlList && o.imgUrlList.length > 0
                                      ? n.default.loadResCustom(String(o.imgUrlList[0]), function (t) {
                                            console.log("ChaoQiGameSDK", "VIVO 原生大图加载成功"),
                                                (e.nativeAdInfo.Native_BigImage = t),
                                                e.createNative_NativeBanner &&
                                                    ((e.createNative_NativeBanner = !1),
                                                    (e.res_NativeBannerLoadNative = e.nativeAdInfo),
                                                    i.default.getInstance().showNativeBanner()),
                                                e.createNative_NativeInters &&
                                                    ((e.createNative_NativeInters = !1),
                                                    (e.res_NativeIntersLoadNative = e.nativeAdInfo),
                                                    i.default.getInstance().showNativeInters());
                                        })
                                      : (e.nativeAdInfo.Native_BigImage = null);
                          }),
                          this.nativeAd.onError(function (e) {
                              console.log("ChaoQiGameSDK", "HW 原生广告加载失败：", JSON.stringify(e));
                          }),
                          this.nativeAd.load());
            }),
            (e.prototype.loadNativeBannerRes = function () {
                var e = this;
                console.log("ChaoQiGameSDK", "--loadNativeBannerRes--"),
                    (this.nativeBannerRes = {
                        NativeBannerBg: null,
                        NativeBannerButton: null,
                        NativeClose: null,
                        NativeAdTip: null
                    }),
                    n.default.loadResArray(
                        [
                            "https://adinfo-1305586391.file.myqcloud.com/SDK/SDKImage/Native1/NativeBannerBg.png",
                            "https://adinfo-1305586391.file.myqcloud.com/SDK/SDKImage/Native1/HWNativeBannerButton.png",
                            "https://adinfo-1305586391.file.myqcloud.com/SDK/SDKImage/Native1/NativeClose.png",
                            "https://adinfo-1305586391.file.myqcloud.com/SDK/SDKImage/Native1/NativeAdTip.png"
                        ],
                        function (t, o) {
                            (e.nativeBannerRes.NativeBannerBg = o[0]),
                                (e.nativeBannerRes.NativeBannerButton = o[1]),
                                (e.nativeBannerRes.NativeClose = o[2]),
                                (e.nativeBannerRes.NativeAdTip = o[3]),
                                (e.loadSucc_NativeBanner = !0),
                                console.log("ChaoQiGameSDK", "原生banner资源加载成功");
                        }
                    );
            }),
            (e.prototype.loadNativeInterRes = function () {
                var e = this;
                console.log("ChaoQiGameSDK", "--loadNativeInterRes--"),
                    (this.nativeIntersRes = {
                        NativeInterMask: null,
                        NativeIntersBg: null,
                        NativeIntersButton: null,
                        NativeIntersClose: null,
                        NativeIntersAdTip: null
                    }),
                    n.default.loadResArray(
                        [
                            "https://adinfo-1305586391.file.myqcloud.com/SDK/SDKImage/Native1/NativeInterMask.png",
                            "https://adinfo-1305586391.file.myqcloud.com/SDK/SDKImage/Native1/NativeIntersBg.png",
                            "https://adinfo-1305586391.file.myqcloud.com/SDK/SDKImage/Native1/HWNativeIntersButton.png",
                            "https://adinfo-1305586391.file.myqcloud.com/SDK/SDKImage/Native1/NativeIntersClose.png"
                        ],
                        function (t, o) {
                            (e.nativeIntersRes.NativeInterMask = o[0]),
                                (e.nativeIntersRes.NativeIntersBg = o[1]),
                                (e.nativeIntersRes.NativeIntersButton = o[2]),
                                (e.nativeIntersRes.NativeIntersClose = o[3]),
                                (e.loadSucc_NativeInters = !0),
                                console.log("ChaoQiGameSDK", "原生插屏资源加载成功");
                        }
                    );
            }),
            (e.prototype.showBanner = function () {
                if (this.loadSucc_Banner)
                    return this.NUM_BannerMostShow <= this.NUM_BannerClose
                        ? (console.log(
                              "ChaoQiGameSDK",
                              "banner最大关闭次数",
                              this.NUM_BannerMostShow,
                              " 已达上限 return"
                          ),
                          void (this.interval_updateBanner && clearInterval(this.interval_updateBanner)))
                        : void (this.hasShowBanner
                              ? console.log("ChaoQiGameSDK", "已经调用过showBanner,请勿重复调用")
                              : ((this.hasShowBanner = !0),
                                (this.loadSucc_SystemBanner = this.SW_SystemBanner && "" != this.ID_SystemBanner),
                                this.SW_SystemBanner && this.SW_NativeBanner
                                    ? this.SW_SystemBannerFirst
                                        ? (console.log("ChaoQiGameSDK", "系统banner优先"),
                                          this.loadSucc_SystemBanner
                                              ? this.showSystemBanner()
                                              : this.loadSucc_NativeBanner &&
                                                (console.log(
                                                    "ChaoQiGameSDK",
                                                    "系统banner未加载完成,改为展示原生banner"
                                                ),
                                                this.showNativeBanner()))
                                        : (console.log("ChaoQiGameSDK", "原生banner优先"),
                                          this.loadSucc_NativeBanner
                                              ? this.showNativeBanner()
                                              : this.loadSucc_SystemBanner &&
                                                (console.log(
                                                    "ChaoQiGameSDK",
                                                    "原生banner未加载完成,改为展示系统banner"
                                                ),
                                                this.showSystemBanner()))
                                    : this.SW_SystemBanner
                                    ? this.showSystemBanner()
                                    : this.SW_NativeBanner && this.showNativeBanner(),
                                this.updateBanner()));
                this.checkBannerLoadSucc();
            }),
            (e.prototype.hideBanner = function () {
                (this.hasShowBanner = !1),
                    this.hideNativeBanner(),
                    this.hideSystemBanner(),
                    this.interval_updateBanner && clearInterval(this.interval_updateBanner),
                    this.timeout_checkBannerLoadSucc && clearTimeout(this.timeout_checkBannerLoadSucc);
            }),
            (e.prototype.getIntersFlag = function () {
                return (
                    this.loadSucc_NativeInters ||
                    (this.SW_AddDesktop && this.NUM_AutoAddDeskMostTimes > 0) ||
                    "" != this.ID_SystemInters
                );
            }),
            (e.prototype.showInters = function () {
                var e = this;
                if (
                    (this.NUM_hasShowInters++,
                    this.SW_IntersIntervalToAddDesktop &&
                        this.NUM_hasShowInters <= this.NUM_IntersToAddDesktopNumber &&
                        (console.log(
                            "ChaoQiGameSDK",
                            "第" + this.NUM_IntersToAddDesktopNumber + "次插屏变添加桌面",
                            "当前第" + this.NUM_hasShowInters + "次"
                        ),
                        this.NUM_hasShowInters == this.NUM_IntersToAddDesktopNumber))
                )
                    this.getAddDesktopFlag(function (t) {
                        t && (console.log("ChaoQiGameSDK", "插屏变添加桌面"), e.addDesktop(function () {}));
                    });
                else {
                    if (this.SW_IntersBaseControl) {
                        if (this.NUM_hasShowInters < this.NUM_IntersStart)
                            return void console.log(
                                "ChaoQiGameSDK",
                                "插屏开始次数未达到",
                                this.NUM_hasShowInters,
                                "目标次数",
                                this.NUM_IntersStart
                            );
                        if (this.NUM_intersNowInterval < this.NUM_IntersIntervalNum)
                            return (
                                console.log(
                                    "ChaoQiGameSDK",
                                    "插屏间隔次数未达到",
                                    this.NUM_intersNowInterval,
                                    "目标次数",
                                    this.NUM_IntersIntervalNum
                                ),
                                void this.NUM_intersNowInterval++
                            );
                        if (this.NUM_IntersNowIntervalTime < this.NUM_IntersIntervalTime)
                            return (
                                console.log(
                                    "ChaoQiGameSDK",
                                    "插屏间隔时间未达到",
                                    this.NUM_IntersNowIntervalTime,
                                    "目标时间",
                                    this.NUM_IntersIntervalTime
                                ),
                                void (
                                    this.SW_AddDesktop &&
                                    this.NUM_IntersNowToAddDesktop < this.NUM_AutoAddDeskMostTimes &&
                                    this.getAddDesktopFlag(function (t) {
                                        t &&
                                            (e.NUM_IntersNowToAddDesktop++,
                                            e.addDesktop(function () {
                                                console.log("ChaoQiGameSDK", "插屏间隔弹桌面");
                                            }));
                                    })
                                )
                            );
                    }
                    (this.NUM_intersNowInterval = 0),
                        this.SW_SystemInters && this.SW_NativeInters
                            ? Math.floor(100 * Math.random()) >= this.NUM_NativeIntersP
                                ? (console.log("ChaoQiGameSDK", "系统插屏优先"),
                                  "" != this.ID_SystemInters
                                      ? (console.log("ChaoQiGameSDK", "系统插屏可以展示"),
                                        this.NUM_IntersDelayTime > 0 &&
                                        Math.floor(100 * Math.random()) < this.NUM_IntersDelayP
                                            ? (console.log(
                                                  "ChaoQiGameSDK",
                                                  "插屏延迟时间(ms):" + this.NUM_IntersDelayTime
                                              ),
                                              setTimeout(function () {
                                                  e.showSystemInters();
                                              }, this.NUM_IntersDelayTime))
                                            : this.showSystemInters())
                                      : (console.log("ChaoQiGameSDK", "系统插屏没有加载完成"),
                                        this.loadSucc_NativeInters &&
                                            (console.log("ChaoQiGameSDK", "改为展示原生插屏"),
                                            this.NUM_IntersDelayTime > 0 &&
                                            Math.floor(100 * Math.random()) < this.NUM_IntersDelayP
                                                ? (console.log(
                                                      "ChaoQiGameSDK",
                                                      "插屏延迟时间(ms):" + this.NUM_IntersDelayTime
                                                  ),
                                                  setTimeout(function () {
                                                      e.showNativeInters();
                                                  }, this.NUM_IntersDelayTime))
                                                : this.showNativeInters())))
                                : (console.log("ChaoQiGameSDK", "原生插屏优先"),
                                  this.loadSucc_NativeInters
                                      ? (console.log("ChaoQiGameSDK", "原生插屏可以展示"),
                                        this.NUM_IntersDelayTime > 0 &&
                                        Math.floor(100 * Math.random()) < this.NUM_IntersDelayP
                                            ? (console.log(
                                                  "ChaoQiGameSDK",
                                                  "插屏延迟时间(ms):" + this.NUM_IntersDelayTime
                                              ),
                                              setTimeout(function () {
                                                  e.showNativeInters();
                                              }, this.NUM_IntersDelayTime))
                                            : this.showNativeInters())
                                      : (console.log("ChaoQiGameSDK", "原生插屏没有加载到"),
                                        "" != this.ID_SystemInters &&
                                            (console.log("ChaoQiGameSDK", "改为展示系统插屏"),
                                            this.NUM_IntersDelayTime > 0 &&
                                            Math.floor(100 * Math.random()) < this.NUM_IntersDelayP
                                                ? (console.log(
                                                      "ChaoQiGameSDK",
                                                      "插屏延迟时间(ms):" + this.NUM_IntersDelayTime
                                                  ),
                                                  setTimeout(function () {
                                                      e.showSystemInters();
                                                  }, this.NUM_IntersDelayTime))
                                                : this.showSystemInters())))
                            : this.SW_SystemInters
                            ? (console.log("ChaoQiGameSDK", "只打开了系统插屏"),
                              this.NUM_IntersDelayTime > 0 && Math.floor(100 * Math.random()) < this.NUM_IntersDelayP
                                  ? (console.log("ChaoQiGameSDK", "插屏延迟时间(ms):" + this.NUM_IntersDelayTime),
                                    setTimeout(function () {
                                        e.showSystemInters();
                                    }, this.NUM_IntersDelayTime))
                                  : this.showSystemInters())
                            : this.SW_NativeInters
                            ? (console.log("ChaoQiGameSDK", "只打开了原生插屏"),
                              this.loadSucc_NativeInters &&
                                  (this.NUM_IntersDelayTime > 0 &&
                                  Math.floor(100 * Math.random()) < this.NUM_IntersDelayP
                                      ? (console.log("ChaoQiGameSDK", "插屏延迟时间(ms):" + this.NUM_IntersDelayTime),
                                        setTimeout(function () {
                                            e.showNativeInters();
                                        }, this.NUM_IntersDelayTime))
                                      : this.showNativeInters()))
                            : console.log("ChaoQiGameSDK", "系统插屏开关和原生插屏开关都没有打开");
                }
            }),
            (e.prototype.getVideoFlag = function () {
                return this.loadSucc_Video;
            }),
            (e.prototype.showVideo = function (e) {
                this.videoAd &&
                    this.loadSucc_Video &&
                    (console.log("ChaoQiGameSDK", "HW showVideo========================"),
                    (this.callback_Video = e),
                    this.videoAd.show());
            }),
            (e.prototype.getNativeIconFlag = function () {
                return !1;
            }),
            (e.prototype.showNativeIcon = function () {}),
            (e.prototype.hideNativeIcon = function () {}),
            (e.prototype.getNativeImageFlag = function () {
                return !1;
            }),
            (e.prototype.showNativeImage = function () {}),
            (e.prototype.hideNativeImage = function () {}),
            (e.prototype.getNativeAdFlag = function () {
                return !1;
            }),
            (e.prototype.getNativeAdInfo = function () {}),
            (e.prototype.reportNativeAdShow = function (e) {
                console.log("ChaoQiGameSDK", "HW 原生广告上报展示", "广告ID为:" + e),
                    this.nativeAd.reportAdShow({adId: e});
            }),
            (e.prototype.reportNativeAdClick = function (e) {
                console.log("ChaoQiGameSDK", "HW 原生广告上报点击", "广告ID为:" + e),
                    this.nativeAd.reportAdClick({adId: e});
            }),
            (e.prototype.getNavigateIconFlag = function () {
                return !1;
            }),
            (e.prototype.showNavigateIcon = function () {}),
            (e.prototype.hideNavigateIcon = function () {}),
            (e.prototype.getNavigateGroupFlag = function () {
                return !1;
            }),
            (e.prototype.showNavigateGroup = function () {}),
            (e.prototype.hideNavigateGroup = function () {}),
            (e.prototype.getNavigateSettleFlag = function () {
                return !1;
            }),
            (e.prototype.showNavigateSettle = function () {}),
            (e.prototype.hideNavigateSettle = function () {}),
            (e.prototype.getNavigateBoxBannerFlag = function () {
                return !1;
            }),
            (e.prototype.showNavigateBoxBanner = function () {}),
            (e.prototype.hideNavigateBoxBanner = function () {}),
            (e.prototype.getNavigateBoxPortalFlag = function () {
                return !1;
            }),
            (e.prototype.showNavigateBoxPortal = function () {}),
            (e.prototype.setGroup = function (e) {
                this.AdGroup = e;
            }),
            (e.prototype.hasAddDesktopFunc = function () {
                return !0;
            }),
            (e.prototype.getAddDesktopFlag = function (e) {
                hbs.hasInstalled({
                    success: function (t) {
                        t
                            ? (console.log("ChaoQiGameSDK", "HW 已创建桌面图标"), e(!1))
                            : (console.log("ChaoQiGameSDK", "HW 未创建桌面图标"), e(!0));
                    },
                    fail: function (t) {
                        console.log("ChaoQiGameSDK", "HW 添加桌面未知错误:" + t), e(!1);
                    }
                });
            }),
            (e.prototype.addDesktop = function (e) {
                hbs.install({
                    success: function () {
                        console.log("ChaoQiGameSDK", "HW 添加桌面成功"), e(!0);
                    },
                    fail: function (t) {
                        console.log("ChaoQiGameSDK", "HW 添加桌面失败:" + JSON.stringify(t)), e(!1);
                    }
                });
            }),
            (e.prototype.phoneVibrate = function (e) {
                "long" == e ? hbs.vibrateLong() : "short" == e && hbs.vibrateShort();
            }),
            (e.prototype.startGameVideo = function () {}),
            (e.prototype.pauseGameVideo = function () {}),
            (e.prototype.resumeGameVideo = function () {}),
            (e.prototype.stopGameVideo = function (e) {
                e(null);
            }),
            (e.prototype.shareVideo = function (e, t, o, n, a) {
                a(null);
            }),
            (e.prototype.jumpToMoreGamesCenter = function () {}),
            (e.prototype.showMoreGamesBanner = function () {}),
            (e.prototype.hideMoreGamesBanner = function () {}),
            (e.prototype.showFavoriteGuide = function () {}),
            (e.prototype.getBoxFlag = function () {
                return !1;
            }),
            (e.prototype.showAppBox = function () {}),
            (e.prototype.getBlockFlag = function () {
                return !1;
            }),
            (e.prototype.showBlock = function () {}),
            (e.prototype.hideBlock = function () {}),
            (e.prototype.getVideoIntersFlag = function () {
                return !1;
            }),
            (e.prototype.showVideoInters = function () {}),
            (e.prototype.exitTheGame = function () {}),
            (e.prototype.reportAnalytics = function () {}),
            (e.prototype.showAuthentication = function () {}),
            (e.prototype.visitorExperience = function () {}),
            (e.prototype.showNativeAd = function () {}),
            (e.prototype.getOPPOShowMoreGameFlag = function () {
                return !1;
            }),
            (e.prototype.showOPPOMoreGame = function () {}),
            (e.prototype.hasNetwork = function () {}),
            (e.prototype.showReviewAlert = function () {}),
            (e.prototype.showiOSADWithScene = function () {}),
            (e.prototype.showiOSADWithType = function () {}),
            (e.prototype.videoUIShow = function () {}),
            (e.prototype.showPrivacyAgreement = function (e, t, o) {
                var a = this;
                if (this.isShow_PrivacyAgreement)
                    console.log("ChaoQiGameSDK", "已经调用过showPrivacyAgreement,请勿重复调用");
                else {
                    (this.isShow_PrivacyAgreement = !0),
                        console.log("ChaoQiGameSDK", "HW showPrivacyAgreement=================="),
                        "" == e &&
                            (e =
                                "https://tencentcnd.minigame.xplaymobile.com/Other/SDK/SDKImage4/PrivacyAgreement/companyLogUrl_Xplay.png"),
                        "" == t &&
                            (t =
                                "https://tencentcnd.minigame.xplaymobile.com/Other/SDK/SDKImage4/Privacy/htmlUrl_Xplay.html");
                    var i = [
                        e,
                        "https://tencentcnd.minigame.xplaymobile.com/Other/SDK/SDKImage4/PrivacyAgreement/PrivacyAgreementBtn.png",
                        "https://tencentcnd.minigame.xplaymobile.com/Other/SDK/SDKImage4/PrivacyAgreement/Agree.png",
                        "https://tencentcnd.minigame.xplaymobile.com/Other/SDK/SDKImage4/PrivacyAgreement/Close.png"
                    ];
                    n.default.loadResArray(i, function (e, n) {
                        var i = cc.director.getScene();
                        (a.node_privacyAgreement = new cc.Node("node_privacyAgreement")),
                            i.addChild(a.node_privacyAgreement),
                            (a.node_privacyAgreement.x = cc.winSize.width / 2),
                            (a.node_privacyAgreement.y = cc.winSize.height / 2),
                            cc.winSize.width < cc.winSize.height
                                ? (a.node_privacyAgreement.scale = cc.view.getDesignResolutionSize().width / 1080)
                                : (a.node_privacyAgreement.scale = cc.view.getDesignResolutionSize().height / 1080),
                            "" != a.AdGroup && (a.node_privacyAgreement.group = a.AdGroup),
                            (a.node_privacyAgreement.zIndex = 3e4);
                        var r = new cc.Node("main");
                        a.node_privacyAgreement.addChild(r),
                            r.addComponent(cc.Sprite),
                            (r.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(n[0])),
                            (r.x = 0),
                            (r.y = 0);
                        var s = new cc.Node("privacyAgreementBtn");
                        r.addChild(s),
                            s.addComponent(cc.Sprite),
                            (s.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(n[1])),
                            s.addComponent(cc.Widget),
                            (s.getComponent(cc.Widget).isAlignRight = !0),
                            (s.getComponent(cc.Widget).right = 236),
                            (s.getComponent(cc.Widget).isAlignBottom = !0),
                            (s.getComponent(cc.Widget).bottom = 207);
                        var l = new cc.Node("agree");
                        r.addChild(l),
                            l.addComponent(cc.Sprite),
                            (l.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(n[2])),
                            l.addComponent(cc.Widget),
                            (l.getComponent(cc.Widget).isAlignRight = !0),
                            (l.getComponent(cc.Widget).right = 23),
                            (l.getComponent(cc.Widget).isAlignBottom = !0),
                            (l.getComponent(cc.Widget).bottom = 50.5);
                        var c = new cc.Node("close");
                        r.addChild(c),
                            c.addComponent(cc.Sprite),
                            (c.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(n[3])),
                            c.addComponent(cc.Widget),
                            (c.getComponent(cc.Widget).isAlignLeft = !0),
                            (c.getComponent(cc.Widget).left = 24.5),
                            (c.getComponent(cc.Widget).isAlignBottom = !0),
                            (c.getComponent(cc.Widget).bottom = 51.5),
                            s.on(cc.Node.EventType.TOUCH_END, function () {
                                hbs.openDeeplink({uri: t});
                            }),
                            l.on(cc.Node.EventType.TOUCH_END, function () {
                                a.hidePrivacyAgreement(), o(!0);
                            }),
                            c.on(cc.Node.EventType.TOUCH_END, function () {
                                a.hidePrivacyAgreement(), o(!1);
                            });
                    });
                }
            }),
            (e.prototype.getErrBannerFlag = function () {
                return !1;
            }),
            (e.prototype.showErrBanner = function (e) {
                e(!1);
            }),
            (e.prototype.hideErrBanner = function () {}),
            (e.prototype.getErrVideoFlag = function () {
                return !1;
            }),
            (e.prototype.buyProps = function (e, t, o, n) {
                n(!1, "");
            }),
            (e.prototype.payComplete = function () {}),
            (e.prototype.checkBannerLoadSucc = function () {
                var e = this;
                if (
                    ((this.loadSucc_SystemBanner = this.SW_SystemBanner && "" != this.ID_SystemBanner),
                    (this.loadSucc_Banner = this.loadSucc_NativeBanner || this.loadSucc_SystemBanner),
                    console.log(
                        "ChaoQiGameSDK",
                        "banner加载成功?",
                        this.loadSucc_Banner,
                        ++this.NUM_CheckBannerLoadSucc
                    ),
                    this.timeout_checkBannerLoadSucc && clearTimeout(this.timeout_checkBannerLoadSucc),
                    this.loadSucc_Banner)
                )
                    this.showBanner();
                else {
                    if (this.NUM_CheckBannerLoadSucc >= this.NUM_MaxCheckBannerLoadSucc) return;
                    this.timeout_checkBannerLoadSucc = setTimeout(function () {
                        e.checkBannerLoadSucc();
                    }, 5e3);
                }
            }),
            (e.prototype.showNativeBanner = function () {
                var e = this;
                if (((this.createNative_NativeBanner = !0), this.hasCreateNative)) {
                    if (this.loadSucc_NewNativeAd) {
                        (this.loadSucc_NewNativeAd = !1),
                            (this.createNative_NativeBanner = !1),
                            (this.isShow_NativeBanner = !0);
                        var t = cc.director.getScene();
                        console.log("ChaoQiGameSDK", "showNativeBanner========================");
                        var o = this.nativeAdInfo.adId;
                        this.reportNativeAdShow(o),
                            (this.nativeAdShowInfo[0] = o),
                            (this.node_nativeBanner = new cc.Node("node_nativeBanner")),
                            t.addChild(this.node_nativeBanner),
                            this.node_nativeBanner.addComponent(cc.Sprite),
                            (this.node_nativeBanner.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                this.nativeBannerRes.NativeBannerBg
                            )),
                            this.node_nativeBanner.addComponent(cc.Widget),
                            (this.node_nativeBanner.getComponent(cc.Widget).isAlignHorizontalCenter = !0),
                            (this.node_nativeBanner.getComponent(cc.Widget).isAlignBottom = !0),
                            (this.node_nativeBanner.getComponent(cc.Widget).bottom = 0),
                            cc.winSize.width < cc.winSize.height
                                ? ((this.node_nativeBanner.width = cc.winSize.width),
                                  (this.node_nativeBanner.height = 0.18 * cc.winSize.width))
                                : ((this.node_nativeBanner.width = cc.winSize.width / 2),
                                  (this.node_nativeBanner.height = 0.18 * this.node_nativeBanner.width)),
                            "" != this.AdGroup && (this.node_nativeBanner.group = this.AdGroup),
                            (this.node_nativeBanner.zIndex = 29999),
                            this.node_nativeBanner.on(cc.Node.EventType.TOUCH_START, function () {
                                e.reportNativeAdClick(o),
                                    console.log(
                                        "ChaoQiGameSDK",
                                        "原生banner关闭",
                                        e.NUM_BannerUpdateTime + "S后再次刷新"
                                    ),
                                    e.hideNativeBanner(),
                                    e.NUM_BannerClose++,
                                    e.updateBanner();
                            });
                        var n = new cc.Node("adTip");
                        this.node_nativeBanner.addChild(n),
                            n.addComponent(cc.Sprite),
                            (n.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                this.nativeBannerRes.NativeAdTip
                            )),
                            (n.height = 0.2 * this.node_nativeBanner.height),
                            (n.width = n.height / 0.45),
                            (n.x = this.node_nativeBanner.width / 2 - n.width / 2),
                            (n.y = this.node_nativeBanner.height / 2 - n.height / 2);
                        var a = new cc.Node("bannerButton");
                        this.node_nativeBanner.addChild(a),
                            a.addComponent(cc.Sprite),
                            (a.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                this.nativeBannerRes.NativeBannerButton
                            )),
                            (a.width = 0.32 * this.node_nativeBanner.width),
                            (a.height = 0.38 * a.width),
                            (a.x = this.node_nativeBanner.width / 2 - 0.185 * this.node_nativeBanner.width),
                            (a.y = -3);
                        var i = new cc.Node("clickBtnTxt");
                        a.addChild(i);
                        var r = i.addComponent(cc.Label);
                        (i.y = -5),
                            (r.overflow = cc.Label.Overflow.NONE),
                            (r.fontSize = (cc.view.getDesignResolutionSize().width / 1080) * 30),
                            (r.string = this.nativeAdInfo.clickBtnTxt),
                            r.addComponent(cc.LabelOutline),
                            (r.getComponent(cc.LabelOutline).color = cc.Color.BLACK),
                            (r.getComponent(cc.LabelOutline).width = 3),
                            a.on(cc.Node.EventType.TOUCH_START, function () {
                                e.reportNativeAdClick(o),
                                    console.log(
                                        "ChaoQiGameSDK",
                                        "原生banner关闭",
                                        e.NUM_BannerUpdateTime + "S后再次刷新"
                                    ),
                                    e.hideNativeBanner(),
                                    e.NUM_BannerClose++,
                                    e.updateBanner();
                            });
                        var s = new cc.Node("image");
                        this.node_nativeBanner.addChild(s),
                            s.addComponent(cc.Sprite),
                            (s.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                this.nativeAdInfo.Native_BigImage
                            )),
                            (s.height = this.node_nativeBanner.height),
                            (s.width = 2 * s.height),
                            (s.x = s.width / 2 - this.node_nativeBanner.width / 2),
                            (s.y = 0);
                        var l = new cc.Node("titleLabel");
                        this.node_nativeBanner.addChild(l),
                            l.addComponent(cc.Label),
                            cc.winSize.width < cc.winSize.height
                                ? (l.getComponent(cc.Label).fontSize =
                                      (cc.view.getDesignResolutionSize().width / 1080) * 35)
                                : (l.getComponent(cc.Label).fontSize =
                                      (cc.view.getDesignResolutionSize().height / 1080) * 35),
                            "" == this.nativeAdInfo.source
                                ? (l.getComponent(cc.Label).string = this.nativeAdInfo.title)
                                : (l.getComponent(cc.Label).string = this.nativeAdInfo.source),
                            (l.getComponent(cc.Label).overflow = cc.Label.Overflow.CLAMP),
                            (l.getComponent(cc.Label).horizontalAlign = cc.Label.HorizontalAlign.LEFT),
                            (l.getComponent(cc.Label).verticalAlign = cc.Label.VerticalAlign.CENTER),
                            (l.getComponent(cc.Label).lineHeight = l.getComponent(cc.Label).fontSize),
                            (l.color = cc.color(255, 0, 0)),
                            (l.width =
                                this.node_nativeBanner.width -
                                2 * this.node_nativeBanner.height -
                                a.width -
                                (0.2 * this.node_nativeBanner.height) / 0.45),
                            (l.height = this.node_nativeBanner.height),
                            (l.y = 0),
                            (l.x =
                                -this.node_nativeBanner.width / 2 + 2.1 * this.node_nativeBanner.height + l.width / 2);
                        var c = new cc.Node("closeICON");
                        this.node_nativeBanner.addChild(c),
                            c.addComponent(cc.Sprite),
                            (c.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                this.nativeBannerRes.NativeClose
                            )),
                            (c.width = 0.27 * this.node_nativeBanner.height),
                            (c.height = 0.27 * this.node_nativeBanner.height),
                            (c.x = -this.node_nativeBanner.width / 2 + c.width / 2),
                            (c.y = this.node_nativeBanner.height / 2 - c.width / 2);
                        var d = new cc.Node("closeButton");
                        this.node_nativeBanner.addChild(d),
                            (d.width = c.height),
                            (d.height = c.height),
                            (d.x = -this.node_nativeBanner.width / 2 + c.width / 2),
                            (d.y = this.node_nativeBanner.height / 2 - c.width / 2),
                            (d.zIndex = 29999),
                            d.on(cc.Node.EventType.TOUCH_START, function (t) {
                                console.log("ChaoQiGameSDK", "原生banner关闭", e.NUM_BannerUpdateTime + "S后再次刷新"),
                                    e.hideNativeBanner(),
                                    e.NUM_BannerClose++,
                                    e.updateBanner(),
                                    t.stopPropagation();
                            });
                    } else this.loadNewNative();
                } else this.createNative();
            }),
            (e.prototype.showSystemBanner = function () {
                console.log("ChaoQiGameSDK", "HW showSystemBanner========================"), this.createSystemBanner();
            }),
            (e.prototype.updateBanner = function () {
                var e = this;
                if (this.NUM_BannerMostShow <= this.NUM_BannerClose)
                    return (
                        console.log(
                            "ChaoQiGameSDK",
                            "banner最大关闭(最多展示)次数",
                            this.NUM_BannerMostShow,
                            " 已达上限 return"
                        ),
                        void (this.interval_updateBanner && clearInterval(this.interval_updateBanner))
                    );
                this.interval_updateBanner && clearInterval(this.interval_updateBanner),
                    (this.interval_updateBanner = setInterval(function () {
                        if (e.NUM_BannerMostShow <= e.NUM_BannerClose)
                            return (
                                console.log(
                                    "ChaoQiGameSDK",
                                    "banner最大关闭(最多展示)次数",
                                    e.NUM_BannerMostShow,
                                    " 已达上限 return"
                                ),
                                void (e.interval_updateBanner && clearInterval(e.interval_updateBanner))
                            );
                        (e.loadSucc_SystemBanner = e.SW_SystemBanner && "" != e.ID_SystemBanner),
                            e.SW_SystemBanner && e.SW_NativeBanner
                                ? e.SW_SystemBannerFirst
                                    ? (console.log("ChaoQiGameSDK", "系统banner优先"),
                                      e.loadSucc_SystemBanner
                                          ? (console.log("ChaoQiGameSDK", "刷新系统banner"), e.updateSystemBanner())
                                          : e.loadSucc_NativeBanner &&
                                            (console.log("ChaoQiGameSDK", "系统banner未加载完成,改为刷新原生banner"),
                                            e.updateNativeBanner()))
                                    : (console.log("ChaoQiGameSDK", "原生banner优先"),
                                      e.loadSucc_NativeBanner
                                          ? (console.log("ChaoQiGameSDK", "刷新原生banner"), e.updateNativeBanner())
                                          : e.loadSucc_SystemBanner &&
                                            (console.log("ChaoQiGameSDK", "原生banner未加载完成,改为刷新系统banner"),
                                            e.updateSystemBanner()))
                                : e.SW_SystemBanner
                                ? e.updateSystemBanner()
                                : e.SW_NativeBanner && e.updateNativeBanner();
                    }, 1e3 * this.NUM_BannerUpdateTime));
            }),
            (e.prototype.updateSystemBanner = function () {
                console.log("ChaoQiGameSDK", "HW updateSystemBanner========================"),
                    this.hideNativeBanner(),
                    this.hideSystemBanner(),
                    this.createSystemBanner();
            }),
            (e.prototype.hideSystemBanner = function () {
                this.isShow_SystemBanner &&
                    (console.log("ChaoQiGameSDK", "HW hideSystemBanner========================"),
                    (this.isShow_SystemBanner = !1),
                    this.bannerAd && (this.bannerAd.destroy(), (this.bannerAd = null)));
            }),
            (e.prototype.updateNativeBanner = function () {
                console.log("ChaoQiGameSDK", "HW updateNativeBanner========================"),
                    this.hideNativeBanner(),
                    this.hideSystemBanner(),
                    this.showNativeBanner();
            }),
            (e.prototype.hideNativeBanner = function () {
                this.isShow_NativeBanner &&
                    (console.log("ChaoQiGameSDK", "HW hideNativeBanner========================"),
                    (this.isShow_NativeBanner = !1),
                    (this.nativeAdShowInfo[0] = ""),
                    this.node_nativeBanner &&
                        (this.node_nativeBanner.removeFromParent(), (this.node_nativeBanner = null)));
            }),
            (e.prototype.showSystemInters = function () {
                "" != this.ID_SystemInters
                    ? (console.log("ChaoQiGameSDK", "HW showSystemInters========================"),
                      this.systemIntersAd ? this.systemIntersAd.load() : this.createSystemInters())
                    : console.log("ChaoQiGameSDK", "HW 插屏未加载完成或后台系统插屏广告id为空");
            }),
            (e.prototype.showNativeInters = function () {
                var e = this;
                if (
                    ((this.createNative_NativeInters = !0),
                    this.node_nativeInters &&
                        (this.node_nativeInters.removeFromParent(), (this.node_nativeInters = null)),
                    this.hasCreateNative)
                ) {
                    if (this.loadSucc_NewNativeAd) {
                        (this.loadSucc_NewNativeAd = !1), (this.createNative_NativeInters = !1);
                        var t = cc.director.getScene();
                        console.log("ChaoQiGameSDK", "showNativeInters========================");
                        var o = this.nativeAdInfo.adId;
                        this.reportNativeAdShow(o),
                            (this.nativeAdShowInfo[1] = o),
                            (this.node_nativeInters = new cc.Node("node_nativeInters")),
                            t.addChild(this.node_nativeInters),
                            (this.node_nativeInters.zIndex = 30003),
                            (this.node_nativeInters.width = 2560),
                            (this.node_nativeInters.height = 2560),
                            (this.node_nativeInters.x = cc.winSize.width / 2),
                            (this.node_nativeInters.y = cc.winSize.height / 2),
                            "" != this.AdGroup && (this.node_nativeInters.group = this.AdGroup),
                            this.node_nativeInters.on(cc.Node.EventType.TOUCH_START, function () {});
                        var n = new cc.Node("NativeInterMask");
                        this.node_nativeInters.addChild(n),
                            n.addComponent(cc.Sprite),
                            (n.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                this.nativeIntersRes.NativeInterMask
                            )),
                            (n.width = this.node_nativeInters.width),
                            (n.height = this.node_nativeInters.height),
                            (n.opacity = 150);
                        var a = new cc.Node("NativeIntersBg");
                        this.node_nativeInters.addChild(a),
                            a.addComponent(cc.Sprite),
                            (a.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                this.nativeIntersRes.NativeIntersBg
                            ));
                        var i = new cc.Node("NativeIntersButton");
                        a.addChild(i),
                            i.addComponent(cc.Sprite),
                            (i.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                this.nativeIntersRes.NativeIntersButton
                            ));
                        var r = new cc.Node("clickBtnTxt");
                        i.addChild(r);
                        var s = r.addComponent(cc.Label);
                        (s.overflow = cc.Label.Overflow.NONE),
                            (s.fontSize = (cc.view.getDesignResolutionSize().width / 1080) * 50),
                            (s.string = this.nativeAdInfo.clickBtnTxt),
                            s.addComponent(cc.LabelOutline),
                            (s.getComponent(cc.LabelOutline).color = cc.Color.BLACK),
                            (s.getComponent(cc.LabelOutline).width = 3),
                            cc.winSize.width < cc.winSize.height
                                ? ((a.width = 0.9 * cc.winSize.width),
                                  (a.height = 0.9 * a.width),
                                  (a.y = 0.05 * cc.winSize.height),
                                  (i.width = 0.55 * a.width),
                                  (i.height = 0.35 * i.width),
                                  (i.y = -a.height / 2 - i.height / 2 - 0.3 * i.height))
                                : ((a.y = 50),
                                  (a.height = 0.8 * cc.winSize.height),
                                  (a.width = 1.15 * a.height),
                                  (i.scale = 0.7),
                                  (i.y = -a.height / 2 + i.height / 2 - 0.1 * i.height)),
                            i.on(cc.Node.EventType.TOUCH_START, function () {
                                e.reportNativeAdClick(o),
                                    (e.nativeAdShowInfo[1] = ""),
                                    e.node_nativeInters.removeFromParent(),
                                    (e.node_nativeInters = null),
                                    (e.NUM_IntersNowIntervalTime = 0);
                            }),
                            a.on(cc.Node.EventType.TOUCH_START, function () {
                                e.reportNativeAdClick(o),
                                    (e.nativeAdShowInfo[1] = ""),
                                    e.node_nativeInters.removeFromParent(),
                                    (e.node_nativeInters = null),
                                    (e.NUM_IntersNowIntervalTime = 0);
                            });
                        var l = new cc.Node("titleLabel");
                        a.addChild(l),
                            l.addComponent(cc.Label),
                            cc.winSize.width < cc.winSize.height
                                ? (l.getComponent(cc.Label).fontSize =
                                      (cc.view.getDesignResolutionSize().width / 1080) * 60)
                                : (l.getComponent(cc.Label).fontSize =
                                      (cc.view.getDesignResolutionSize().height / 1080) * 60),
                            this.nativeAdInfo.title.length >= 10 &&
                                (this.nativeAdInfo.title = this.nativeAdInfo.title.substring(0, 10)),
                            (l.getComponent(cc.Label).string = this.nativeAdInfo.title),
                            (l.getComponent(cc.Label).horizontalAlign = cc.Label.HorizontalAlign.CENTER),
                            (l.getComponent(cc.Label).verticalAlign = cc.Label.VerticalAlign.CENTER),
                            (l.getComponent(cc.Label).overflow = cc.Label.Overflow.SHRINK),
                            (l.getComponent(cc.Label).lineHeight = l.getComponent(cc.Label).fontSize),
                            (l.color = cc.color(204, 124, 112)),
                            (l.width = 0.8 * a.width),
                            (l.height = 0.2 * a.width),
                            (l.y = a.height / 2 - l.height / 2 + 0.02 * a.height);
                        var c = new cc.Node("sourceLabel");
                        a.addChild(c),
                            c.addComponent(cc.Label),
                            cc.winSize.width < cc.winSize.height
                                ? (c.getComponent(cc.Label).fontSize =
                                      (cc.view.getDesignResolutionSize().width / 1080) * 50)
                                : (c.getComponent(cc.Label).fontSize =
                                      (cc.view.getDesignResolutionSize().height / 1080) * 50),
                            (c.getComponent(cc.Label).overflow = cc.Label.Overflow.SHRINK),
                            (c.getComponent(cc.Label).string = this.nativeAdInfo.source),
                            (c.getComponent(cc.Label).horizontalAlign = cc.Label.HorizontalAlign.CENTER),
                            (c.getComponent(cc.Label).verticalAlign = cc.Label.VerticalAlign.CENTER),
                            (c.getComponent(cc.Label).lineHeight = c.getComponent(cc.Label).fontSize),
                            (c.color = cc.color(153, 124, 112)),
                            (c.width = 420),
                            (c.height = 60),
                            (c.y = a.height / 2 - c.height / 2 - 0.18 * a.height),
                            console.log("=====原生插屏广告大图展示=========");
                        var d = new cc.Node("bigImage");
                        a.addChild(d),
                            d.addComponent(cc.Sprite),
                            (d.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                this.nativeAdInfo.Native_BigImage
                            )),
                            (d.width = 0.85 * a.width),
                            (d.height = 0.45 * d.width),
                            (d.y = d.height / 2 - 0.24 * a.height);
                        var h = new cc.Node("NativeIntersClose");
                        a.addChild(h),
                            h.addComponent(cc.Sprite),
                            (h.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                                this.nativeIntersRes.NativeIntersClose
                            )),
                            (h.zIndex = 30010),
                            (h.x = a.width / 2 - ((h.width / 2) * 1.25 * a.width) / 1080 - 0.02 * a.width),
                            (h.y = a.height / 2 - ((h.width / 2) * 1.25 * a.width) / 1080 - 0.03 * a.width),
                            (h.scale = a.width / 1080),
                            h.on(cc.Node.EventType.TOUCH_START, function (t) {
                                (e.NUM_IntersNowIntervalTime = 0),
                                    (e.nativeAdShowInfo[1] = ""),
                                    e.node_nativeInters.removeFromParent(),
                                    (e.node_nativeInters = null),
                                    t.stopPropagation();
                            });
                    } else this.loadNewNative();
                } else this.createNative();
            }),
            (e.prototype.loadNewNative = function () {
                this.nativeAd && this.nativeAd.load();
            }),
            (e.prototype.hidePrivacyAgreement = function () {
                this.isShow_PrivacyAgreement &&
                    (console.log("ChaoQiGameSDK", "hidePrivacyAgreement========================"),
                    (this.isShow_PrivacyAgreement = !1),
                    this.node_privacyAgreement &&
                        (this.node_privacyAgreement.removeFromParent(), (this.node_privacyAgreement = null)));
            }),
            (e.prototype.runIntersInterval = function () {
                var e = this;
                this.NUM_IntersIntervalTime > 0 &&
                    setInterval(function () {
                        e.NUM_IntersNowIntervalTime++;
                    }, 1e3);
            }),
            (e.prototype.onGameShow = function () {
                var e = this;
                hbs.onShow(function () {
                    console.log(
                        "ChaoQiGameSDK",
                        "HW 游戏回到前台,是否有原生广告展示中:",
                        "" != e.nativeAdShowInfo[0] || "" != e.nativeAdShowInfo[1]
                    ),
                        "" != e.nativeAdShowInfo[0] && e.reportNativeAdShow(e.nativeAdShowInfo[0]),
                        "" != e.nativeAdShowInfo[1] && e.reportNativeAdShow(e.nativeAdShowInfo[1]);
                });
            }),
            e
        );
    })();
o.default = r;
